#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
    int a = 1, b = 1, n = 0;
    scanf("%d", &n);
    if (n == 1 || n == 2)
    {
        printf("1\n");
        return 0;
    }
    int z = 0;
    for (int i = 3; i <= n; i++)
    {
        z = a + b;
        a = b;
        b = z;
    }
    printf("%d", z);
    return 0;
}